/* 
 * File:   GridCell.h
 * Author: walther
 *
 * Created on October 20, 2012, 7:45 PM
 */

#ifndef GRIDCELL_H
#define	GRIDCELL_H

#include <vector>
#include "Vector4D.h"
#include "Object.h"


class GridCell
{
public:
    /**
     * Constructor
     * @param min Coordinates of the minimum values of x, y and z of the Cell
     * @param max Coordinates of the maximum values of x, y and z of the Cell
     */
    GridCell( Vector4D min, Vector4D max );
    
    /**
     * Destructor
     */
    virtual ~GridCell();
    
    /**
     * Inserts and objects into the cell
     * @param objectID Identifier of the object being inserted
     */
    void addObject( int objectID );
    
    /**
     * @return Vector with the minimum coordinate values of the cell
     */
    Vector4D getMin();
    
    /**
     * @return Vector with the maximum coordinate values of the cell
     */
    Vector4D getMax();
    
    /** Array of the objects that overlap the grid cell */
    std::vector<int> _objects;

private:
    /** minimum values of x, y and z of the cell aabb */
    Vector4D _min;
    
    /** maximum values of x, y and z of the cell aabb */
    Vector4D _max;
};

#endif	/* GRIDCELL_H */

